<template>
  <div>
    <div :class="isChild ? 'c-fs20':'c-fs24'" class="c-bg-white c-bd-b1 c-fc-gray c-flex-row c-aligni-center c-pv20">
      <span class="c-w25 c-textAlign-c">{{isChild ? '客户姓名':'消费者'}}</span>
      <span class="c-w25 c-textAlign-c">{{isChild ? '产品类型':'消费类型'}}</span>
      <span class="c-w25 c-textAlign-c">时间</span>
      <span class="c-w25 c-textAlign-c">金额</span>
    </div>
    <div class="c-bg-white">
      <div class="c-hh120 c-fs20 c-flex-row c-aligni-center c-bd-b1" v-for="(item,index) in dataList" :key="index">
        <div class="c-w25 c-flex-column c-flex-center">
          <div class='c-text-ellipsis2'>{{item.customerName}}</div>
          <div>{{item.customerPhone}}</div>
        </div>
        <div class="c-w25 c-flex-row c-flex-center c-text-ellipsis3">{{item.type}}</div>
        <div class="c-w25 c-flex-column c-flex-center">
          <div>{{item.createdAt && item.createdAt.split(' ')[0]}}</div>
          <div>{{item.createdAt && item.createdAt.split(' ')[1]}}</div>
        </div>
        <div class="c-w25 c-flex-row c-flex-center color-orange">
          {{'￥' | iosPriceFilter}}{{item.money}}
        </div>
      </div>
      <loading-status-tem :dataStatus="dataStatus" noDataText="暂无相关记录"></loading-status-tem>
    </div>
  </div>
</template>

<script>
import loadingStatusTem from '@/components/templates/common/loadingStatusTem.vue'
export default {
  name: 'ComRecommend',
  components: {
    loadingStatusTem,
  },
  props: {
    isChild: {
      type: Boolean,
      default: false
    },
    dataStatus: {
      type: String,
      default: 'HAS_MORE_DATA'
    },
    dataList: {
      type: Array,
      default: () => {
        return [];
      }
    }
  },
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.color-orange {
  color: #fc6e21;
}
</style>
